//
//  WebController.m
//  projectBase
//
//  Created by zhuang on 15/10/10.
//  Copyright (c) 2015年 zhuang. All rights reserved.
//

#import "WebController.h"

@interface WebController ()<UIWebViewDelegate>

@end

@implementation WebController

-(void) initUI
{
    [super initUI];
    [self setTopTitle:_bartitle];
    self.view.backgroundColor = [UIColor whiteColor];
    
    if(_webUrl != nil)
    {
        UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, TopBarHeight, ScreenWidth, ScreenHeight-TopAndSystemHeight)];
        webView.delegate = self;
        [webView loadRequest:[NSURLRequest requestWithURL:_webUrl]];
        [self.view addSubview:webView];
    }
    [self showLoadView:CGRectMake(0, TopBarHeight, ScreenWidth, ScreenHeight-TopAndSystemHeight) backColor:[UIColor clearColor]];
    

}

- (void)webViewDidFinishLoad:(UIWebView *)webView
{
    [self closeLoadView];
}
@end
